package org.vaadin.vaadinjit.widgetset.client.ui;

import com.google.gwt.core.client.JavaScriptObject;

/**
 * <p>
 * The overlay base class. Inherits JavaScriptObject.
 * </p>
 * <p>
 * The purpose of overlay types is to wrap JavaScript classes into
 * native Java classes.
 * </p>
 * 
 * @author jonkka
 *
 */
public abstract class JitOverlay extends JavaScriptObject {

	/**
	 * Overlays always specifies an empty protected constructor
	 * 
	 */
	protected JitOverlay() {}
	
	
	public final native JitCanvasOverlay getCanvas() /*-{
		return this.canvas;
	}-*/;
	
	/**
	 * Load the given JSON data
	 * 
	 * @param json data in JSON format
	 */
	final native void loadJSON(JavaScriptObject json) /*-{
		this.loadJSON(json);
	}-*/;
}
